Skip to content

new: add stress_transfer command to test nonce serialization#1

Open
vaab wants to merge 1 commit into
masterfrom
stress-transfer
Open

new: add stress_transfer command to test nonce serialization#1
vaab wants to merge 1 commit into
masterfrom
stress-transfer

Conversation

@vaab

@vaab vaab commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a stress_transfer command to exercise the per-account nonce
lock + confirmation under cross-process contention on a test currency.

Fires N back-to-back transferNant transactions to a target
address with no artificial delay. Meant to be run in two shells on the
same host against the same wallet, to validate that concurrent senders
serialize correctly (no nonce gaps or collisions).

Output

For each send it prints:

  • the authoritative nonce, re-queried by hash via
    getTransactionInfo (the raw geth tx carries its real nonce);
  • the pinned node read from the per-account lock file;
  • the tx hash and elapsed time.

At the end it dumps the pending pool across all nodes, filtered to the
wallet address, so queued entries (the smoking gun for a nonce
gap) and collisions are easy to spot.

Usage

# two shells, same host, same wallet, test currency:
pyc3l stress_transfer -w wallet.json -p pass.txt -r A -n 20 -y 0xTARGET
pyc3l stress_transfer -w wallet.json -p pass.txt -r B -n 20 -y 0xTARGET
# add -l pyc3l:INFO to see the lock contention logs

Note

This exercises the nonce-serialization fix in pyc3l
(com-chain/pyc3l#5).

Fires N back-to-back ``transferNant`` transactions to a target
address with no artificial delay, relying on the library's per-account
nonce lock + confirmation.  Meant to be run in two shells on the same
host against the same wallet to exercise cross-process nonce
serialization on a test currency.

For each send it prints the authoritative nonce (re-queried by hash
via ``getTransactionInfo``), the pinned node (read from the lock
file), and the tx hash; at the end it dumps the pending pool across
all nodes filtered to the wallet address, so gaps (``queued`` entries)
and collisions are easy to spot.

Assisted-by: Claude:claude-opus-4-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant